package cn.enited.devtools.apiaggregator.converter;

import cn.enited.devtools.apiaggregator.dto.ProjectDto;
import cn.enited.devtools.apiaggregator.entity.Project;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ProjectConverter extends EntityConverter {

    @Mappings({})
    Project dto2Entity(ProjectDto dto);

    @Mappings({})
    ProjectDto entity2Dto(Project entity);

    @Mappings({})
    Project.Configuration configDto2Entity(ProjectDto.ConfigurationDto dto);

    @Mappings({})
    ProjectDto.ConfigurationDto configEntity2Dto(Project.Configuration entity);

    List<ProjectDto> entities2DtoList(List<Project> entities);
}
